<?
	function createSession($r) {
		foreach(array_keys($r) as $i) $_SESSION[$i] = $r[$i];
		$exp = time()+60*60*24*365;
		setcookie('id',$r['id'],$exp,'/');
		setcookie('pass',$r['pass'],$exp,'/');
	}
?>